<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>邀请记录</title>
		<link rel="stylesheet" type="text/css" href="css/style.css" />
		<link rel="stylesheet" type="text/css" href="css/aui.css" />
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
		<script src="js/art-template.js" type="text/javascript" charset="utf-8"></script>
		<!--<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>-->
		<style>
			p{
				margin:0;
			}
			header{
				padding: 50px 0 100px 0;
				text-align: center;
				background: url(img/bg_record.png) no-repeat center center;
				background-size: 100% 100%;
			}
			header *{
				color:#Fff;
			}
			header div span {
				font-size: 60px;
				margin:0 5px;
			}
			.content .list li{
				padding: 12px 0;	
				border-bottom: 1px solid #ccc;
				overflow: hidden;
				width: 90%;
				margin:0 auto;
			}
			.content .list li img {
				float:left;
				width:50px;
				height:50px;
				border-radius: 50%;
			}
			.content .list li p{
				line-height: 25px;
			}
			.content .list li .name-time{
				float:left;
				margin-left:10px;
			}
			.invite-btn{
				position: fixed;
				width:90%;
				left:0;
				bottom:0;
				text-align: center;
				background: #fe9a35;
				color: #fff;
				line-height: 50px;
				border-radius: 30px;
				margin: 10px 17px;
				font-weight: 600;
				font-size: 16px;
				font-weight: 600;
			}
		</style>
	</head>
		
			
	<body>
		<header style="margin-top:-40px">
			<div><span id="account" ></span>天</div>
			<p style="font-size:14px; margin-top: -5px;">累计奖励天数</p>
			<p style="font-size: 14px;margin-top:10px;padding:0 30px;text-align: left;">会员期内，每邀请一位好友加入，你的会员期限可延长7天（奖励不设上限）</p>
		</header>
		<div class="content">
			<div class="col-xs-6" style="text-align: center;font-size: 15px;padding: 10px 0 20px 0;">
				好友
			</div>
			<div class="col-xs-6" style="text-align: center;font-size: 15px;padding: 10px 0 20px 0;">
				奖励天数
			</div>
			<ul class="list" id="inviteList" style="padding-bottom: 60px;">
				<!--<li>
					<img src="img/pyq.png" alt=""/>
				
					<div class="name-time">
						<p style="font-size: 15px;">张三</p>
						<p style="color:#999;font-size: 12px;">2017-11-14</p>
					</div>
					<div style="color: orange;float: right;line-height: 50px;font-size: 16px;">
						+7
					</div>
				</li>-->
			</ul>
		</div>
		<div class="invite-btn">
			邀请好友
		</div>
	</body>
	<script id="listData" type="text/html">
		{{each data}}
		<li>
			<img src="{{$value.headimg}}" alt=""/>
		
			<div class="name-time">
				<p style="font-size: 15px;color: #333;">{{$value.nickname}}</p>
				<p style="color:#999;font-size: 12px;">{{timeFormat($value.indate)}}</p>
			</div>
			<div style="color: orange;float: right;line-height: 50px;font-size: 16px;">
				+7
			</div>
		</li>
		{{/each}}
	</script>
</html>
<script src="js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/purl.js"></script>
<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
<script src="js/aui-toast.js" type="text/javascript" charset="utf-8"></script>
<script src="js/aui-dialog.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
	
	var toast = new auiToast();
	var type = GetQueryString('type');
	template.defaults.imports.timeFormat=function(str){  
	    var date=str.split(' ')[0];
		var dateStr=date.split('-')[1]+'-'+date.split('-')[2];
		var time=str.split(' ')[1]
		var timeStr=time.split(':')[0]+':'+time.split(':')[1];
		return dateStr+' '+timeStr
	}  
	var totalpage = null;
		  $(function(){
			
			$(".invite-btn").click(function(){
				window.location.href = "memberPage.html?showInviteMask=1";
			});
			//分享的弹出
			
			var data = JSON.parse(window.sessionStorage.getItem("weixinData"));
			$("#cover").attr("src",data.data.headImgUrl);
			$("#name").html(data.data.nickname)
			
			$("#kefu").click(function(){
				$(".mask").show();
			})
		  	$(".mask").click(function(){
				$(this).hide();
			})
		  	
		  	//获取邀请人列表
		  	var getInviteList=function(){
		  		$.ajax({
					type: "get",
					url: hostUrl+'product/vip/free/list?openId=' + openId,
					success: function(data) {
						var html = template("listData", data);
						document.getElementById('inviteList').innerHTML = html;
						var acount=7*data.data.length;
						$('#account').html(acount)
					}
				});
		  	}
		  	getInviteList()
		  })
		
		  
		 
		 

	




		
</script>